#!/usr/bin/python
Import ('env')

cflags=''
sources = env.Glob('intern/source/*.c')

incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna'
incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
incs += ' ../include ../blenloader'

defs = []

if env['WITH_BF_YAFRAY']:
    incs += ' ../yafray'
else:
    defs.append('DISABLE_YAFRAY')

if env['WITH_BF_QUICKTIME']:
    defs.append('WITH_QUICKTIME')
    incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']

if env['WITH_BF_FFMPEG']:
    defs.append('WITH_FFMPEG')

if env['WITH_BF_OPENEXR']:
    defs.append('WITH_OPENEXR')

if env['OURPLATFORM']=='linux2':
    cflags='-pthread'

env.BlenderLib ( libname = 'blender_render', sources = sources, includes = Split(incs), defines=defs, libtype='core', priority=45, compileflags=cflags )
